package org.xmdl.silk.interpreter;

import java.util.Map;
import java.util.HashMap;

import org.xmdl.silk.Variable;

public class ExecutionFrame {

	private Map<String, Value> params = new HashMap<String, Value>();

	public Value getValue(Variable variable) {
		//assertEQ(variable.eContainer(), method);
		return params.get(variable.getName());
	}

	public void setValue(Variable variable, Value value) {
		//assertEQ(variable.eContainer(), method);
		params.put(variable.getName(), value);
	}

	void assertEQ(Object x, Object y) {
		if (!x.equals(y))
			throw new IllegalStateException("Unexpected " + y);
	}
}
